<template>
    <div class="">
        <el-button class="next" type="primary" size="mini" icon="el-icon-right" @click="next"></el-button>
    </div>
</template>

<script>
import { showAuthor, showMore } from "../../js/methods"
import { showNewMap } from "../../js/map"
import { showWaypoint } from "../../js/waypoint"
import { showTrajectoryAdd } from "../../js/trajectory"

export default {
    name: 'previous',
    components:{
        
    },
    props:["param"],

    data(){
        return{
           name: ""
        }
    },
    mounted(){
        
    },

    methods:{
        next:function(){
            const that = this;
            that.$store.commit('switchAutherModule',false);
            that.$store.commit("switchEditMapBtns", false);
            that.$store.commit('switchAddStation', false);
            that.$store.commit('switchAddTrack', false);
            switch(that.param){
                case "authorization":
                    showNewMap(true);
                    break;
                case "map":
                    showWaypoint(true);
                    break;
                case "waypoint":
                    showTrajectoryAdd(true);
                    break;
                case "trajectory":
                    showMore(true);
                    break;
                default:
                    break;
            }
        }
    },

    //属性监听
    watch:{
       
    }

}
</script>

<style scoped lang="less">
 .next{
     position: absolute;
     top: 20px;
     right: 20px;
 }
</style>